package com.itheima;
import com.itheima.controller.UserController;
import com.itheima.entity.People;
import com.itheima.entity.Sun;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class AnnotationTest {
    public static void main(String[] args){
        ApplicationContext applicationContext=new
                ClassPathXmlApplicationContext("applicationContext.xml");
//        UserController usercontroller=(UserController)
//                applicationContext.getBean("userController");
//        usercontroller.save();

//        People people = (People)applicationContext.getBean("people");
//        System.out.println(people);

        Sun sun = (Sun)applicationContext.getBean("sun");
        sun.up();
        System.out.println(sun);
        Sun sun1 = (Sun)applicationContext.getBean("sun");
        sun1.up();
        System.out.println(sun1);
    }
}